/* eslint-disable simple-import-sort/imports */
import TDesign from 'tdesign-vue-next';
import { createApp } from 'vue';

import App from './App.vue';
import router from './router';
import { store } from './store';
import i18n from './locales';

import '@/style/index.less';
import './permission';

import FcDesigner from '@form-create/designer';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'tdesign-vue-next/es/style/index.css';
import '@tdesign-vue-next/chat/es/style/index.css';
import TDesignChat from '@tdesign-vue-next/chat'; // 引入chat组件
import '@wangeditor/editor/dist/css/style.css' // 引入 css

const app = createApp?.(App);

// 使用 Element Plus 和 FcDesigner
app?.use?.(ElementPlus);
app?.use?.(FcDesigner);
app?.use?.(FcDesigner.formCreate);

app?.use?.(TDesign).use(TDesignChat);
app?.use?.(store);
app?.use?.(router);
app?.use?.(i18n);

app?.mount?.('#app');
